package lookas.csvparser.converters;

import java.math.BigDecimal;

import org.apache.commons.beanutils.Converter;

public class DecimalConverter implements Converter{

    public BigDecimal match(String s){
        return new BigDecimal(s.replaceAll(",", "."));
    }

    @SuppressWarnings("unchecked")
    public Object convert(Class type, Object value){
        return match((String)value);
    }
}
